/*
 * The Controller to NI INTERFACE
 */
package ni;

import java.nio.file.Path;
import java.util.ArrayList;

/**
 *
 * @author gb
 */
public interface ChatCtrlr2NI {

    /**
     * Sends a Hello Signal in broadcast. Assumes the local username has been
     * set in the model Needs to - set the local netUsername in the model
     */
    public void sendHello();

    /**
     * Sends a Goodbye Signal in broadcast. Assumes the local netUsername has
     * been set in the model
     */
    public void sendGoodbye();

    /**
     * Sends a TextMessage Signal to each destination in the "to" list with UDP.
     * Assumes the local netUsername has been set in the model Assumes the names
     * in the arraylist are netUsernames
     *
     * @param message The message to send
     * @param to The list of user to whom this is destinated
     */
    public void sendTextMessage(String message, ArrayList<String> to);

    /**
     * Sends a FileProposal Signal to each destination in the "to" list with
     * UDP. Assumes the local netUsername has been set in the model Assumes the
     * names in the arraylist are netUsernames
     *
     * @param filePath The path to the file that has been selected by the user
     * to be sent
     * @param to The list of user to whom this is destinated
     */
    public void sendFileProposal(Path filePath, ArrayList<String> to);

    /**
     * Tells the remote user that the local user accepted the file. Launches a
     * thread that will receive the file and write it in the Download folder.
     *
     * @param filename The name of the file
     * @param fileSize The size of the file
     * @param remoteNetname The remote user name
     * @param to The list of receivers
     */
    public void sendFileTransferAccepted(String filename, long fileSize, String remoteNetname, ArrayList<String> to);

    /**
     * Tells the remote user that the local user refused the file.
     *
     * @param filename The name of the file
     * @param fileSize The size of the file
     * @param remoteNetname The remote user name
     * @param to The list of receivers
     */
    public void sendFileTransferNotAccepted(String filename, long fileSize, String remoteNetname, ArrayList<String> to);

}
